package com.ktjy.service.Impl;

import com.ktjy.entity.Auction;
import com.ktjy.mapper.AuctionMapper;
import com.ktjy.service.AuctionService;
import com.ktjy.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Date;
import java.util.List;

public class AuctionServiceImpl implements AuctionService {
    @Override
    public int add(Auction auction) {
        return 0;
    }

    @Override
    public List<Auction> getAuctionList() {
        try (SqlSession sqlSession = MyBatisUtil.createSqlSession()) {
            AuctionMapper mapper = sqlSession.getMapper(AuctionMapper.class);
            return mapper.getAuctionList();
        }
    }

    @Override
    public Auction getAutionBy(String auctionName, String auctionDesc, Date auctionStartTime, Date auctionEndTime, Double auctionStartPrice) {
        return null;
    }

    @Override
    public Auction getAuctionById(int id) {
        return null;
    }

    @Override
    public int update(Auction auction) {
        return 0;
    }

    @Override
    public int delete(int id) {
        return 0;
    }
}
